Adds the ability to get a pixel based upon its offset.
X and Y coordinate can be calculate using:
ImageStorage!Color image = ...; size_t offset = ...; size_t x = offset % image.height; size_t y = offset / image.height;
Offset from X and Y coordinate can be calculated as:
ImageStorage!Color image = ...; size_t x, y = ...; size_t offset = x + (y * image.width);
Get a pixel given the position.
Set a pixel given the position.
The number of pixels in total
ImageStorage
See Implementation
Adds the ability to get a pixel based upon its offset.
X and Y coordinate can be calculate using:
Offset from X and Y coordinate can be calculated as: